﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


namespace AllInOne
{
    public class DateTimeHelper
    {
        /// <summary>
        /// 获取当月第一天
        /// </summary>
        /// <returns></returns>
        public static DateTime FirstDay()
        {
            return DateTime.Now.AddDays(1 - DateTime.Now.Day).Date;
        }
        /// <summary>
        /// 获取当月最后一天
        /// </summary>
        /// <returns></returns>
        public static DateTime EndDay()
        {
            return DateTime.Now.AddDays(1 - DateTime.Now.Day).Date.AddMonths(1).AddSeconds(-1);
        }
    }
}
